--[[ * 大招伤害修正]]

---@class BuffEffect5205101 : BaseBuffEffect
BuffEffect5205101 = ClientFight.CreateClass("BuffEffect5205101", ClientFight.BaseBuffEffect)
local t = BuffEffect5205101
t.BUFF_EFFECT_5205101_BUFF_ID = "BUFF_EFFECT_5205101_BUFF_ID";

function t:add(fight, buff)
    local fighter = buff.target;
    fighter.parametersByObject[t.BUFF_EFFECT_5205101_BUFF_ID] = buff.modelId;
    return super.add(fight, buff);
end
---@param fight Fight
---@param buff FighterBuff
function t:action(fight, buff, ...)
    local parameters = {...};
    local buffEffectValue = buff.buffBean.f_BuffEffectValue;
    local damageRatio = buffEffectValue[1];
    local times = buff.effectParams[BuffEffect5205100.BUFF_EFFECT_522100_GENERAL_ATTACK_TIMES] or 0;
    if (times > 0) then
        local fr = parameters[3];
        local i = damageRatio * times;
        if (table.getn(buffEffectValueh) > 1) then
            if (i > buffEffectValue[2]) then
                i = buffEffectValue[2];
            end
        end
        local addDamage = calcRatio(fr.damage, i);
        fr.damage = fr.damage + addDamage;
        SkillRoleMgr.savePathFile("[" .. fight.frame .. "][EFFECT]Fighter " .. buff.target.fighterId .. " Buff:"
                .. buff.modelId .. " 吸引普攻子弹数量:" .. (times) .. " 伤害加深: " .. addDamage);
    end
    return ClientFight.BaseBuffEffect.action(self, fight, buff, ...);
end

t.New()